#ifndef QRADAR_H
#define QRADAR_H


#include <QChartView>
#include <QPolarChart>
#include <QLineSeries>
#include <QCategoryAxis>
#include <QAreaSeries>
#include <QScatterSeries>
#include <QDebug>
#include <QGraphicsLayout>
#include <QChart>
QT_CHARTS_USE_NAMESPACE
class QRadarImpl;
class QRadar:public QtCharts::QChartView {
    Q_OBJECT
    Q_PROPERTY(QBrush backgroundBrush READ backgroundBrush WRITE setBackgroundBrush)
  public:
    explicit QRadar(QWidget *parent = 0);
    virtual ~QRadar();

    void setRange(qreal t_min, qreal t_max) const;
    void addStat(const QString&t_label,qreal t_value) const;
    void drawChart();
    void configAreaColor(
        QColor drawAreaColor = Qt::yellow,
        QColor baseAreaColor = Qt::yellow,
        QColor drawLineColor = Qt::transparent,
        QColor baseLineColor = Qt::transparent
    );
    void configAxisColor(
        QColor axisGridLineColor = Qt::transparent,
        QColor axisSideLineColor = Qt::transparent,
        QColor radialLineColor = Qt::transparent,
        QColor radiusLineColor = Qt::transparent
    );
    QtCharts::QCategoryAxis* getAngularAxis()const;
    QtCharts::QValueAxis* getRadialAxis()const;
    QtCharts::QLineSeries* getBaseLineSeries()const;
    QtCharts::QLineSeries* getDrawLineSeries()const;
    QtCharts::QAreaSeries* getBaseAreaSeries()const;
    QtCharts::QAreaSeries* getDrawAreaSeries()const;
    QtCharts::QLineSeries* getCenterSeries()const;
    //QChart *chart() const;
  protected:
    QRadarImpl *m_impl;
};


#endif // QRADAR_H
